# data_modules/redis_db.py
import redis
from config import REDIS_CONFIG as default_config

class RedisClient:
    def __init__(self, config=default_config):
        self.client = redis.Redis.from_url(config['CACHE_REDIS_URL'])

    def update_config(self, new_config):
        self.client = redis.Redis.from_url(new_config['CACHE_REDIS_URL'])

redis_client = RedisClient()